package cn.rulian.base.common.vo;

import java.util.ArrayList;
import java.util.List;

import org.springframework.data.domain.Page;

/**
 * EasyUI DataGrid 结果集
 */
public class Result{
	
	private long total = 0; //总页数

	@SuppressWarnings("rawtypes")
	private List rows = new ArrayList(); //数据记录

	@SuppressWarnings("rawtypes")
	private List footer = new ArrayList(); //统计数据

	@SuppressWarnings("rawtypes")
	public static Result getResult(Page page)
	{
		Result result =new Result();
		result.setRows(page.getContent());
		result.setTotal(page.getTotalElements());
		return result;
	}
	


	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	@SuppressWarnings("rawtypes")
	public List getRows() {
		return rows;
	}

	@SuppressWarnings("rawtypes")
	public void setRows(List rows) {
		this.rows = rows;
	}

	@SuppressWarnings("rawtypes")
	public List getFooter() {
		return footer;
	}

	@SuppressWarnings("rawtypes")
	public void setFooter(List footer) {
		this.footer = footer;
	}

}